"""
Copyright 2019 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.

This product uses the FRED® API but is not endorsed or certified
by the Federal Reserve Bank of St. Louis. FRED terms of use
available at https://research.stlouisfed.org/docs/api/terms_of_use.html
"""

from typing import Union
import datetime as dt

from dataclasses import dataclass


@dataclass
class FredQuery:
    api_key: str = ''
    series_id: str = ''
    file_type: str = 'json'
    observation_start: Union[dt.date, dt.datetime] = None
    observation_end: Union[dt.date, dt.datetime] = None
    realtime_end: dt.datetime = None
    realtime_start: dt.datetime = None
